import request from '@/config/axios'

// 学生入学信息 VO
export interface UstcStudentInfoAdmissionVO {
  id: number // 主键
  accountId: number // 账号ID
  admissionsYear: string // 招生年度
  candidateNumber: string // 考生号
  admissionCategory: string // 录取类别
  examMethod: string // 考试方式
  retentionPeriod: string // 保留入学资格年限
  trainingUnitLocation: string // 定向委培单位所在地
  trainingUnit: string // 定向委培单位
  rewardsSanctions: string // 入学前奖励处分
  personalExperience: string // 入学前个人经历
  familyInfo: string // 家庭成员信息
}

// 学生入学信息 API
export const UstcStudentInfoAdmissionApi = {
  // 查询学生入学信息分页
  getUstcStudentInfoAdmissionPage: async (params: any) => {
    return await request.get({ url: `/core/ustc-student-info-admission/page`, params })
  },

  // 查询学生入学信息详情
  getUstcStudentInfoAdmission: async (id: number) => {
    return await request.get({ url: `/core/ustc-student-info-admission/get?id=` + id })
  },

  // 新增学生入学信息
  createUstcStudentInfoAdmission: async (data: UstcStudentInfoAdmissionVO) => {
    return await request.post({ url: `/core/ustc-student-info-admission/create`, data })
  },

  // 修改学生入学信息
  updateUstcStudentInfoAdmission: async (data: UstcStudentInfoAdmissionVO) => {
    return await request.put({ url: `/core/ustc-student-info-admission/update`, data })
  },

  // 删除学生入学信息
  deleteUstcStudentInfoAdmission: async (id: number) => {
    return await request.delete({ url: `/core/ustc-student-info-admission/delete?id=` + id })
  },

  // 导出学生入学信息 Excel
  exportUstcStudentInfoAdmission: async (params) => {
    return await request.download({ url: `/core/ustc-student-info-admission/export-excel`, params })
  }
}
